import 'package:flutter/material.dart';
import 'package:todo/pages/pages.dart';
import 'package:todo/widgets/widgets.dart';

class HomePage extends StatelessWidget {
  List<BottomNavigationBarItem> _buildBottomNavigation() {
    return [
      BottomNavigationBarItem(
        title: const Text("任务"),
        icon: Icon(Icons.access_time),
      ),
      BottomNavigationBarItem(
        title: const Text("消息"),
        icon: Icon(Icons.message),
      ),
      BottomNavigationBarItem(
        title: const Text("设置"),
        icon: Icon(Icons.settings),
      )
    ];
  }

  @override
  Widget build(BuildContext context) {
    return TodoScaffold(
      pages: <Widget>[TodosPage(), MessagePage(), SettingPage()],
      bottomNavigationItems: _buildBottomNavigation(),
    );
  }
}
